<!--
描述：学校模块-课程类型添加
开发人：zhaohang
开发日期：2019年10月31日
-->
<template lang="pug">
  kalix-dialog.user-add(title='添加' bizKey="classSelect" ref="kalixBizDialog" v-bind:formModel.sync="formModel" v-bind:targetURL="targetURL")
    div.el-form(slot="dialogFormSlot")
      el-form-item(label="类型名称" prop="selectName"  v-bind:rules="rules.selectName")
        el-input(v-model="formModel.selectName")
      el-form-item(label="是否启用" prop="use"  v-bind:rules="rules.use")
        el-select(v-model="formModel.use"  placeholder="请选择")
          el-option(v-for="item in option" v-bind:key="item.value" v-bind:value="item.value" v-bind:label="item.label")
</template>

<script type="text/ecmascript-6">
  import {classSelectURL} from '../../config.toml'
  import FormModel from './model'

  export default {
    name: 'ClassSelectAdd',
    data() {
      return {
        formModel: Object.assign({}, FormModel),
        rules: {
          selectName: [{required: true, message: '请输入名称', trigger: 'change'}],
          use: [{required: true, message: '请选择是否启用', trigger: 'change'}]
        },
        targetURL: classSelectURL,
        option: [{
          value: true,
          label: '启用'
        }, {
          value: false,
          label: '不启用'
        }],
        items: []
      }
    }
  }
</script>

<style scoped lang="stylus" type="text/stylus">

</style>
